#coding:utf-8
import os
from common.FuyuanwaiConf import FuyuanwaiConf
from common.koufuApi import KoufuApi
from common.koufuShopApi import KoufuShopApi
from common.tool import Tools

__author__ = 'yangxianming'

from common.KoufuConf import KoufuConf
import json
import requests


def case():
    #初始化必要的参数
    fuyuanwaiConf = FuyuanwaiConf()
    test_url = fuyuanwaiConf.testDomain + "/merchantWeb/point"
    tool = Tools
    tf = True
    test_result = ""

    #首页口福场景查询
    body = {"deduct_amount":10,"card_id":"310103198504096039","corp_id":"05c1623e71ae404784fe00d59fee28bc","request_id":1560998649993}
    p ={"action":"efuli.corp.and.card.balance.reduce","body":body}
    print(p)
    r = requests.post(test_url, data=json.dumps(p), headers=fuyuanwaiConf.testCorpHeader)
    print("[efuli.corp.and.card.balance.reduce]\n", r.content.decode("utf-8"))



    #定义预期描述
    print(str(tf))
    # print(test_result)
    expect_result = "返回参数ebuyCode是否是空"

    #返回测试结果 第一个参数:True or False    第二个参数测试结果描述
    return tf, [test_result, expect_result]

case()